@keyframes fx-animation-progress-active {
  0% {
    width: 0;
    opacity: .1
  }
  20% {
    width: 0;
    opacity: .5
  }
  to {
    width: 100%;
    opacity: 0
  }
}

.fx-progress {
  width: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: $font-color-default;

  &.circle {
    width: 50px;
    height: 50px;
  }

  &.primary {
    > .progress-line {
      > .line > .inline {
        background-color: $color-primary;
      }
    }
  }

  &.success {
    > .progress-line {
      > .line > .inline {
        background-color: $color-success;
      }
    }
  }

  &.warning {
    > .progress-line {
      > .line > .inline {
        background-color: $color-warning;
      }
    }
  }

  &.error {
    > .progress-line {
      > .line > .inline {
        background-color: $color-error;
      }
    }
  }

  > .progress-line {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;

    > .line {
      width: 100%;
      background-color: $progress-inline-background;
      position: relative;
      overflow: hidden;

      > .inline {
        height: 100%;
        position: absolute;
        left: 0;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        color: $progress-inline-font-color;
        transition: all 0.15s;
        font-size: 12px;
        overflow: hidden;

        &.active {
          &::after {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 0;
            height: 100%;
            background-color: #fff;
            animation: fx-animation-progress-active 2.4s cubic-bezier(.23, 1, .32, 1) infinite;
          }
        }
      }
    }

    > .out-text {
      margin-left: 10px;
      width: 40px;
      min-width: 40px;
      text-align: center;
      @extend .text_hide;
    }
  }

  > .progress-circle {
    width: 100%;
    height: 100%;
    display: inline-block;
    position: relative;

    .progress-circle-inner {
      stroke: $progress-inline-background;
    }

    > .fx-progress-text {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translateX(-50%) translateY(-50%);
      color: $font-color-default;
    }

    svg {
      path {
        display: inline-block;
        width: 100%;
        height: 100%;
        transition: stroke-dasharray 0.6s ease 0s, stroke 0.6s ease 0s, color 0.3s;
        stroke-dashoffset: 0;
        stroke-dasharray: 295.31px, 295.31px;
      }
    }
  }
}
